package com.ly.count.score;


import com.ly.count.score.param.CPlusRoomScorePage;
import com.ly.count.score.po.CPlusRoomScoreRecord;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import com.ly.count.http.CPlusResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.bind.annotation.RequestBody;
import com.ly.count.service.score.CPlusRoomScoreRecordService;
import org.springframework.web.bind.annotation.RestController;
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liaoyong
 * @since 2024-10-03
 */
@RestController
@RequestMapping("/cPlusRoomScoreRecord")
@Tag(name= "积分接口")
public class CPlusRoomScoreRecordController {
    @Autowired
	@Resource(name = "cPlusRoomScoreRecordService")
	private CPlusRoomScoreRecordService cPlusRoomScoreRecordService;

	@Operation(summary= "详情")
    @RequestMapping(method = RequestMethod.POST, value = "/detail")
	public CPlusResponse<CPlusRoomScoreRecord> detail(@RequestBody CPlusRoomScoreRecord cPlusRoomScoreRecord){
		return cPlusRoomScoreRecordService.selectOne(cPlusRoomScoreRecord);
	}
	
	@RequestMapping(method = RequestMethod.POST, value = "/page")
	@Operation(summary= "分页列表")
	public CPlusResponse<Page<CPlusRoomScoreRecord>> page(@RequestBody CPlusRoomScorePage cPlusRoomScorePage){
		return cPlusRoomScoreRecordService.pageList(cPlusRoomScorePage);
	}
	
	@RequestMapping(method = RequestMethod.POST, value = "/add")
	@Operation(summary= "新增")
	public CPlusResponse<Object> add(@RequestBody CPlusRoomScoreRecord cPlusRoomScoreRecord){
	   
	   return cPlusRoomScoreRecordService.add(cPlusRoomScoreRecord);
	}
	@Operation(summary= "编辑")
	@RequestMapping(method = RequestMethod.POST, value = "/modify")
	public CPlusResponse modify(@RequestBody CPlusRoomScoreRecord cPlusRoomScoreRecord){
	
	   return cPlusRoomScoreRecordService.modify(cPlusRoomScoreRecord);
	}
	
}

